package bma.common.langutil.jmshell.common;

import bma.common.langutil.jmshell.JMShellProcessor;
import bma.common.langutil.jmshell.JMShellUtil;
import bma.common.langutil.jmshell.Session;

public class JMShellProcessor4SessionClose implements JMShellProcessor {

	public static String[] COMMANDS = new String[] { "exit", "close", "bye",
			"quit" };

	@Override
	public boolean process(Session session, String text) {
		if (JMShellUtil.isCommand(text, COMMANDS)) {
			session.close();
			return true;
		}
		return false;
	}
}
